package JiHeDemo.mygenneric;

public class dome1 implements dome2<String> {
	@Override
	public String server(String t) {
		System.out.println(t);
		return t;
	}
}

interface dome2<T> {
	String name = "张三";

	T server(T t);

}

class Test11 {
	public static void main(String[] args) {
		dome1 d1 = new dome1();
		d1.server("nihao");
		dome3<String> d3 = new dome3();
		d3.server("d3");
		dome4 d4 = new dome4();
		d4.show(10);
		d4.show("nihao");
		d4.show(3.14);
		d4.show(d1.server("hhh"));

	}
}

class dome3<T> implements dome2<T> {

	@Override
	public T server(T t) {
		System.out.println(t);
		return t;
	}
}

class dome4 {
	public <T> T show(T t) {
		System.out.println(t);
		return t;
	}
}